package com.demo.day409;

public class pratice1 {
    //男=4 女=3 俩小孩=1
    public static void people() {
        int a;
        int b;
        int c;
        int i = 0;
        int num = 100;
        for (a = 0; a < num/4; a++) {
            for (b = 0; b < num/3 ; b++) {
                for (c = 0; c < num*2; c++) {
                    if (c%2==0 && 4*a+3*b+c/2==num && a+b+c==num) {
                        i++;
                        System.out.println("男人数：" + a + "女人数：" + b + "小孩数：" + c);
                    }
                }
            }

        }
        if (i==0){
            System.out.println("no result!");
        }

    }

    public static void main(String[] args) {
        people();

    }
}
